﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<InternshipManagement.Models.Announcement>" %>
<%@ Import Namespace="InternshipManagement.Helpers" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    Create
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

<script src="<%: Url.Content("~/Scripts/jquery.validate.min.js") %>" type="text/javascript"></script>
<script src="<%: Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js") %>" type="text/javascript"></script>
<% 
    string action = Model == null ? "Create" : "Edit";
    ViewBag.AnnouncementOp = Model == null ? 2 : 3;
    Html.RenderPartial("AnnouncementMenu"); 
%>
<% using (Html.BeginForm(action, "Announcement", FormMethod.Post, new { enctype = "multipart/form-data" })){ %>
    <%: Html.ValidationSummary(true) %>
    <fieldset id="announcementcreate">
        <div class="editor-label">
            <%: Html.ValidationMessageFor(model => model.Title)%>
        </div>
        <div class="editor-field">
            <%: Html.WatermarkedTextBoxFor(model => model.Title,"Enter your title here") %>
        </div>

        <div class="editor-label">
            <%: Html.ValidationMessageFor(model => model.Message)%>
        </div>
        <div class="editor-field">
            <%: Html.WatermarkedTextAreaFor(model => model.Message,"Enter your message here")%>
        </div>
        <div class="editor-field">
            <span class="attachment">Attachment</span>
            <input type="file" size="51" id="attachment" name="attachment"/> 
        </div>
        <div class="editor-label" style="padding-top:20px;">
            <p>Select parties to receive the announcement</p>
        </div>
        <div class="editor-field">
            <span class="customLabel">Students</span>
            <%: Html.CustomCheckBoxFor(model => model.IsStudentReceiving) %>
            <span class="customLabel">Companies</span>
            <%: Html.CustomCheckBoxFor(model => model.IsCompanyReceiving)%>
            <span class="customLabel">Secretaries</span>
            <%: Html.CustomCheckBoxFor(model => model.IsSecretaryReceiving)%>
        </div>
        <div class="editor-field" style="clear:left;margin-top:40px;">
            <span class="customLabel">Send Email</span>
            <%: Html.CustomCheckBox("email")%>
        </div>
        <p>
            <input type="submit" value="SEND ANNOUNCEMENT" />
        </p>
    </fieldset>
<% } %>

</asp:Content>

